package org.oos.dao;

import static org.oos.ApiUrlProvider.Search;

import org.oos.OOS4Java;
import org.oos.atom.SiteFeed;
import org.oos.atom.SiteFeedImpl;
import org.oos.atom.entries.SiteEntry;
import org.oos.atom.entries.SiteEntryImpl;
import org.oos.dao.lists.ReadOnlyDynamicList;

import com.google.api.client.http.GenericUrl;

/**
 * Internal implementation of the {@link SiteDao}. This class shouldn't be used
 * outside of this package.
 * 
 * No instances of this class should be created outside of the API
 * 
 * @see DaoFactory
 * @see OOS4Java
 * 
 * @author pablo.gonzalez@11870.com
 * 
 */
public class SiteDaoImpl extends
		ReadOnlyAbstractDao<SiteEntry, SiteFeed<SiteEntry>> implements SiteDao {

	/* Internal constructors */

	public SiteDaoImpl() {
		super(SiteFeedImpl.class, SiteEntryImpl.class);
	}

	@Override
	public GenericUrl getFeedUrl() {
		return Search.getUrl();
	}

	@SuppressWarnings("unchecked")
	@Override
	protected ReadOnlyDynamicList<SiteEntry, SiteFeed<SiteEntry>> getList(
			SiteFeed feed) {
		return new ReadOnlyDynamicList<SiteEntry, SiteFeed<SiteEntry>>(this,
				feed);
	}

}
